<template>
  <h3>Child...</h3>
  <p>{{ modelValue }}</p>
  <button @click="handleClick">按钮</button>
</template>

<script lang="ts">
export default {
  name: "Child",
  props: {
    modelValue: {
      type: Number,
      required: true,
    },
  },
  emits: ["update:modelValue"],
  methods: {
    handleClick() {
      this.$emit("update:modelValue", this.modelValue + 1);
    },
  },
};
</script>

<style></style>
